import { http } from "@/utils/http";
import baseUrlProxy from "@/api/baseUrlProxy";

export const getMonthData = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/regulate_line/getMonthData",
    {
      params: data
    }
  );
};
// /api/dispatching_plan/getPlan

export const getPlan = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/dispatching_plan/getPlan",
    {
      params: data
    }
  );
};

// 日历数据获取
// /api/regulate_line/getRegulateItem
export const getRegulateItem = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/regulate_line/getRegulateItem",
    {
      params: data
    }
  );
};

// 新增或修改某天的编制数据
// /api/regulate_line/addOrUpdate
export const addOrUpdate = (data?: object) => {
  return http.request<any>(
    "post",
    baseUrlProxy + "/api/regulate_line/addOrUpdate",
    {
      data: data
    }
  );
};

// 提交某天的编制数据
// /api/regulate_line/confirmRegulate

export const confirmRegulate = (data?: unknown) => {
  return http.request<any>(
    "post",
    baseUrlProxy + "/api/regulate_line/confirmRegulate",
    {
      data: data
    }
  );
};
// 获取右侧 计划协同调节性能
// /api/dispatching_plan/getRegulatoryPerf
export const getRegulatoryPerf = (data?: unknown) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/dispatching_plan/getRegulatoryPerf",
    {
      params: data
    }
  );
};
// 获取 中间
///api/dispatching_plan/getExecuteInfo
export const getExecuteInfo = (data?: unknown) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/dispatching_plan/getExecuteInfo",
    {
      params: data
    }
  );
};

// 优化算法
export const optimizationCalculation = (data?: unknown) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/regulate_line/optimizationCalculation",
    {
      params: data
    }
  );
};
// export const getVppListAll = (data?: object) => {
//   return http.request<any>("get", baseUrlProxy + "/api/vpp_info/getVppInfo", {
//     params: data
//   });
// };
// export const getVppUserDetail = id => {
//   return http.request<ResultVppUserList>(
//     "get",
//     baseUrlProxy + "/api/vpp_user/id/" + id
//   );
// };
// export const addVppUserList = (data?: object) => {
//   return http.request<any>("post", baseUrlProxy + "/api/vpp_user", {
//     data: data
//   });
// };
//
// export const editVppUserList = (data?: object) => {
//   return http.request<any>("put", baseUrlProxy + "/api/vpp_user", {
//     data: data
//   });
// };
//
// export const delVppUserList = (data?: object) => {
//   return http.request<any>("delete", baseUrlProxy + "/api/vpp_user", {
//     data: data
//   });
// };
//
// export const exportVppUserList = (data?: object) => {
//   return http.request<any>(
//     "get",
//     baseUrlProxy + "/api/vpp_user/download",
//     { params: data },
//     { responseType: "blob" }
//   );
// };
// export const getDistrictInfo = (data?: object) => {
//   return http.request<any>("get", baseUrlProxy + "/api/districtInfo/lazy", {
//     params: data
//   });
// };
